using CefSharp;
using CefSharp.WinForms;
using ZingBlog.Client.Service;

namespace ZingBlog.Client
{
    public partial class Form1 : Form
    {
        public ChromiumWebBrowser chromeBrowser;
        public Form1()
        {
            this.MaximizedBounds = Screen.PrimaryScreen.WorkingArea;
            InitializeComponent();
            InitializeChromium();
        }
        public void InitializeChromium()
        {
            var settings = new CefSettings();
            settings.Locale = "zh-CN";
            settings.UserAgent = "";
            Cef.Initialize(settings);
            chromeBrowser = new ChromiumWebBrowser($"https://azing.cn/admin/home/index", null);
            chromeBrowser.RequestHandler = new RequestHandler();
            chromeBrowser.Dock = DockStyle.Fill;
            this.Controls.Add(chromeBrowser);

        }
        private void Form1_Load(object sender, EventArgs e)
        {

        }
    }
}